import arcpy, string, os
from arcpy import env
#env.workspace=r"D:\NFTA\query"
env.workspace=r"D:\NFTA\OutsideCustomerFinder_Python\query2"
#outpath=r"D:\NFTA\OutsideCustomerFinder_Python\src\dbf"
outpath=r"D:\NFTA\OutsideCustomerFinder_Python\dbf2"
files=arcpy.ListFiles("*.xls")
for file in files:
    outputFile=string.replace(file, ".xls", ".dbf")
    print "converting " + outputFile
    arcpy.TableToTable_conversion(file + "/" + "Sheet1$", outpath, outputFile)
